package com.airbat.prize.common.enums;

import com.airbat.prize.common.core.LongArrayValuable;
import lombok.Getter;

import java.util.Arrays;

/**
 * @ClassName ZZCKCulturalLevelEnum
 * @Description 众智常口文化程度字典
 * @Author wmj
 * @Date 2022/8/29 16:51
 * @Project ds
 * @Version 1.0
 */
@Getter
public enum  ZZCKCulturalLevelEnum  implements LongArrayValuable{

     GRADUATE10(10,10,"研究生"),
     GRADUATE11(11,17,"研究生毕业"),
     GRADUATE19(19,19,"研究生肄业"),
     GRADUATE20(20,20,"大学本科"),
     GRADUATE21(21,21,"本科毕业"),
     GRADUATE28(28,22,"本科结业"),
     GRADUATE29(29,23,"本科肄业"),
     GRADUATE30(30,30,"专科教育"),
     GRADUATE31(31,31,"专科毕业"),
     GRADUATE38(38,32,"专科结业"),
     GRADUATE39(39,33,"专科肄业"),
     GRADUATE40(40,40,"中等职业教育"),
     GRADUATE41(41,41,"中等专科毕业"),
     GRADUATE42(42,41,"中等专科毕业"),
     GRADUATE48(48,42,"中等专科结业"),
     GRADUATE49(49,43,"中等专科肄业"),
     GRADUATE50(50,40,"中等职业教育"),
     GRADUATE51(51,47,"技工学校毕业"),
     GRADUATE59(59,49,"技工学校肄业"),
     GRADUATE60(60,60,"普通高中教育"),
     GRADUATE61(61,61,"普通高中毕业"),
     GRADUATE62(62,44,"职业高中毕业"),
     GRADUATE63(63,44,"职业高中毕业"),
     GRADUATE68(68,62,"普通高中结业"),
     GRADUATE69(69,63,"普通高中肄业"),
     GRADUATE70(70,70,"初级中学教育"),
     GRADUATE71(71,71,"初中毕业"),
     GRADUATE72(72,71,"初中毕业"),
     GRADUATE73(73,71,"初中毕业"),
     GRADUATE78(78,71,"初中毕业"),
     GRADUATE79(79,73,"初中肄业"),
     GRADUATE80(80,80,"小学教育"),
     GRADUATE81(81,81,"小学毕业"),
     GRADUATE88(88,90,"其他"),
     GRADUATE89(89,83,"小学肄业"),
     GRADUATE90(90,90,"其他"),

    ;
    /**
     * 众智常口暂口值
     */
    private final long zzValue;
    /**
     * 执法二期值
     */
    private final long zf2Value;
    /**
     * 名称
     */
    private final String name;


    public static final long [] ARRAYS =  Arrays.stream(values()).mapToLong(ZZCKCulturalLevelEnum::getZzValue).toArray();

    ZZCKCulturalLevelEnum(long zzValue, long zf2Value,String name) {
        this.zzValue = zzValue;
        this.zf2Value = zf2Value;
        this.name = name;
    }


   @Override
    public long[] array() {
        return ARRAYS;
    }
    public static ZZCKCulturalLevelEnum getEnum(long value) {
        return Arrays.stream(values()).filter(tr -> tr.getZzValue() == value).findFirst().get();
    }
}
